import request from '@/utils/request'

// 查询采购审批单列表
export function listPurchaseInfoSp(query) {
  return request({
    url: '/business/purchaseInfoSp/list',
    method: 'get',
    params: query
  })
}
// 查询采购审批单列表
export function listPurchaseInfoSpSelect(query) {
  return request({
    url: '/business/purchaseInfoSp/selectList',
    method: 'get',
    params: query
  })
}


// 查询采购审批单详细
export function getPurchaseInfoSp(id) {
  return request({
    url: '/business/purchaseInfoSp/' + id,
    method: 'get'
  })
}

// 新增采购审批单
export function addPurchaseInfoSp(data) {
  return request({
    url: '/business/purchaseInfoSp',
    method: 'post',
    data: data
  })
}

// 修改采购审批单
export function updatePurchaseInfoSp(data) {
  return request({
    url: '/business/purchaseInfoSp',
    method: 'put',
    data: data
  })
}

// 删除采购审批单
export function delPurchaseInfoSp(id) {
  return request({
    url: '/business/purchaseInfoSp/' + id,
    method: 'delete'
  })
}
// 采购单生成合同
export function htScPurchaseInfoSp(id) {
  return request({
    url: '/business/purchaseInfoSp/htsc/'+id,
    method: 'get',
  })
}
